\section{Storage}
\label{storage}

Both the GIM client and server use Java's built-in serialization features to store data locally while they are not running. The Data class of the server and the Options class of the client both implement Serializable from \texttt{java.io}. This allows them to be serialized and stored on disk using an ObjectOutputStream object (also in \texttt{java.io}).

When the client starts it reads this file from the disk and uses an ObjectInputStream to turn the raw data back into the Options object. For the server, it is not quite so simple. Although the server serializes the entire Data object, some of the data stored in it (such as as rooms) does not need to be persisted across sessions and we create a section Data object and copy the persistent data from the serialized object into it.
